
// src-electron/preload.js
const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('electronAPI', {
    getResources: (params) => ipcRenderer.invoke('get-resources', params),
    addResource: (resource) => ipcRenderer.invoke('add-resource', resource),
    updateResource: (resource) => ipcRenderer.invoke('update-resource', resource),
    deleteResource: (id) => ipcRenderer.invoke('delete-resource', id)
})